﻿Public Class message
    Dim TopA As Integer
    Dim TopN As Integer
    Dim ScreenH As Integer
    Dim ScreenW As Integer
    Private Sub closemessage_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles closemessage.LinkClicked
        Me.Hide()
    End Sub
    Private Sub Panel1_Paint(sender As Object, e As PaintEventArgs)
        Me.Hide()
    End Sub
    Private Sub start_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ScreenH = My.Computer.Screen.WorkingArea.Height
        ScreenW = My.Computer.Screen.WorkingArea.Width
    End Sub
    Sub showmessage()
        Me.Show()
        TopA = (ScreenH - Me.Height)
        Me.Left = (ScreenW - Me.Width)
        Me.Top = ScreenH + 50
        Timer1.Start()
    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        TopN = Me.Top
        If TopN > TopA Then
            Me.Top -= 10
        End If
    End Sub

    Private Sub TextBox_TextChanged(sender As Object, e As EventArgs) Handles TextBox.DoubleClick, Label1.Click, ОткрытьЛОГToolStripMenuItem.Click
        form_log.Show()
    End Sub

    Private Sub ОГлавноеОкноПрограммыToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ОГлавноеОкноПрограммыToolStripMenuItem.Click
        start.WindowState = FormWindowState.Normal
    End Sub
    Private Sub ЗАкрытьСообщениеToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ЗАкрытьСообщениеToolStripMenuItem.Click
        Me.Hide()
    End Sub
End Class